/* 8911106 302933981 Ofri Keidar */

/******************************************************************************
* Student Name: Ofri Keidar
* Exercise Name: Ex6
* File Description: Class NoItemError's interface. NoItemError is an
* 				    exceptions raised when trying to order or sell an item that
* 				    does not exist in catalog. The class is derived from MyInventoryException
******************************************************************************/


#ifndef NOITEMERROR_H_
#define NOITEMERROR_H_
#include "MyInventoryException.h"

class NoItemError: public MyInventoryException {
protected:
	short m_invalidItem; // invalid item number

public:
	/***************************************************************************************
	* function name: NoItemError(const short invalidItem)
	* The Input: Invalid item number
	* The output: None
	* The Function operation: Creates a new NoItemError object
	***************************************************************************************/
	NoItemError(const short invalidItem);

	/***************************************************************************************
	* function name: NoItemError(const NoItemError& excpToCopy)
	* The Input: NoItemError object to be copied
	* The output: None
	* The Function operation: Creates a new NoItemError object that its m_errorMsg
	* 					      attribute points at NULL, since its error message will be
	* 					      set when calling to what()
	***************************************************************************************/
	NoItemError(const NoItemError& excpToCopy);

	/***************************************************************************************
	* function name: ~NoItemError() throw()
	* The Input: None
	* The output: None
	* The Function operation: Destructs NoItemError object. Empty implementation since
	* 						  NoItemError's member is of primitive type
	***************************************************************************************/
	~NoItemError() throw() {}

	/***************************************************************************************
	* function name: const char* what()
	* The Input: None
	* The output: Error message
	* The Function operation: Creates an error message according to exception's attributes
	* 					      and returns it
	***************************************************************************************/
	const char* what();
};


#endif
